package models

import (
	"encoding/json"
	"fmt"
	"os"
)

type Configuration struct {
	CallBackUrl string
	Secret      string
}

func GetConfig() *Configuration {
	file, _ := os.Open("config.json")
	defer file.Close()
	decoder := json.NewDecoder(file)
	conf := &Configuration{}
	err := decoder.Decode(&conf)
	if err != nil {
		fmt.Println("Error:", err)
	}
	return conf
}
